package huffmanTree;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.ImmutableList;

import java.util.HashMap;
import java.util.List;

/**
 * @author Aaron
 * @desc
 * @createTime 2021/12/10 21:22
 * @since
 */
public class ImmutableHuffmanTree<T> extends AbstractHuffmanTree<T> {

    public ImmutableHuffmanTree(List<T> valueList) {
        super(valueList);
    }

    public ImmutableHuffmanTree(T value) {
        this.compressMappingResult = HashBiMap.create();
        this.valueFrequency = new HashMap<>();
        this.valueList = ImmutableList.of(value);
        buildTree();
    }

    @Override
    public void addValue(T value) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void deleteValue(T node) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void addValueList(List<T> valueList) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void deleteValueList(List<T> valueList) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void addHuffmanTree(HuffmanTree<T> huffmanTree) {
        throw new UnsupportedOperationException();
    }
}
